package com.itheima.admin.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;
import com.itheima.admin.pojo.Module;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ModuleAddDto {

    private String name;
    private String parentId;
    private String ctype;
    private String state;
    private String curl;
    private String remark;


    public Module toModule(){
        Module module = new Module();
        BeanUtils.copyProperties(this,module);
        return module;
    }
}
